var user = {
	deleteUser : function(id, name) {
		if (!confirm("Are you sure to delete the user [ " + name + " ] ?")) {
			return;
		}
		user.editStatus(id, "user/delete/"+id);
	},
	editStatus : function(id, url) {
		$.post(url, {
			id : id,
		}, function(data) {
			user.statusChangeCallback(id, data);
		});
	},
	statusChangeCallback : function(id, data) {
		if (data == "true") {
			var ipage = getDateTablePageInfo(oTable.fnSettings()).iPage;
			oTable.fnPageChange(ipage);
		} else {
			alertAjaxMessage.slideDown("error", data.message);
		}
	},
	renderUserActions : function(id, name) {
		var base = $("base").attr("href");
		var edit = "<a class='btn' href='"+base+"user/update/" + id
				+ "'>Edit</a>";
		var del = "<a class='btn' href='javascript:user.deleteUser(" + id
				+ ",\"" + name + "\")'>Delete</a>";
		return edit + del;
	}
}